Skip to content

Add validation scenario tests - #2503

Merged
rogancarr merged 12 commits into
dotnet:masterfrom
rogancarr:2499_validation_scenario_tests
Feb 13, 2019
Merged

Add validation scenario tests#2503
rogancarr merged 12 commits into
dotnet:masterfrom
rogancarr:2499_validation_scenario_tests

Conversation

@rogancarr

@rogancarr rogancarr commented Feb 11, 2019

Copy link
Copy Markdown
Contributor

This PR adds a test for training with a validation set.

Fixes #2499

@codecov

codecov Bot commented Feb 11, 2019

Copy link
Copy Markdown

Codecov Report

Merging #2503 into master will increase coverage by <.01%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master    #2503      +/-   ##
==========================================
+ Coverage   71.25%   71.25%   +<.01%     
==========================================
  Files         798      797       -1     
  Lines      141252   141270      +18     
  Branches    16112    16112              
==========================================
+ Hits       100643   100658      +15     
- Misses      36145    36151       +6     
+ Partials     4464     4461       -3
Flag Coverage Δ
#Debug 71.25% <100%> (ø) ⬆️
#production 67.57% <ø> (-0.01%) ⬇️
#test 85.36% <100%> (ø) ⬆️

@Ivanidzo4ka Ivanidzo4ka left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@glebuk
glebuk self-requested a review February 12, 2019 18:34
var preprocessedValidData = preprocessor.Transform(validData);

// Train the model with a validation set
var trainedModel = mlContext.Regression.Trainers.FastTree(numTrees: 2)

@glebuk glebuk Feb 12, 2019

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

trainedModel [](start = 16, length = 12)

add early stopping criteria in the options so that the validation set is actually useful.
Such as https://docs.microsoft.com/en-us/dotnet/api/microsoft.ml.trainers.fasttree.boostedtreeargs.earlystoppingrule?view=ml-dotnet #Closed

// Combine the model
var model = preprocessor.Append(trainedModel);

// Score the data sets

@glebuk glebuk Feb 12, 2019

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sets [](start = 30, length = 4)

periods at the end of comments throughout. #Closed

@glebuk glebuk left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@rogancarr
rogancarr merged commit e818e35 into dotnet:master Feb 13, 2019
@rogancarr
rogancarr deleted the 2499_validation_scenario_tests branch February 13, 2019 02:14
@ghost ghost locked as resolved and limited conversation to collaborators Mar 24, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants